package com.bwda.dsrs.systemservice.domain.form.notify;

import com.bwda.dsrs.base.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
/**
 * 系统消息新增表单
 *
 * @author yanyuemei
 * @date 2019/4/27
 */
@Data
@ApiModel
public class NotifyCreateForm {

	@ApiModelProperty(value = "标题")
	private String title;

	@ApiModelProperty(value = "内容")
	private String content;

	@ApiModelProperty(value = "发布时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date publishTime;

	@ApiModelProperty(value = "是否撤销")
	private String revokeFlag;

	@ApiModelProperty(value = "撤销时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date revokeTime;

	@ApiModelProperty(value = "是否删除")
	private String deleteFlag;

	@ApiModelProperty(value = "删除时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date updateTime;

	@ApiModelProperty(value = "")
	private String url;

	@ApiModelProperty(value = "通告类型0.消息，1.待办")
	private String notType;

	@ApiModelProperty(value = "用户code")
	private String userCode;

	@ApiModelProperty(value = "是否阅读")
	private String readFlag;

	@ApiModelProperty(value = "阅读时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date readTime;

	public Date getPublishTime() {
		if (publishTime != null){
			return (Date) publishTime.clone();
		}

		return null;
	}

	public void setPublishTime(Date publishTime) {
		if (publishTime != null){
			this.publishTime = (Date) publishTime.clone();
		}
	}

	public Date getRevokeTime() {
		if (revokeTime != null){
			return (Date) revokeTime.clone();
		}

		return null;
	}

	public void setRevokeTime(Date revokeTime) {
		if (revokeTime != null){
			this.revokeTime = (Date) revokeTime.clone();
		}
	}

	public Date getUpdateTime() {
		if (updateTime != null){
			return (Date) updateTime.clone();
		}

		return null;
	}

	public void setUpdateTime(Date updateTime) {
		if (updateTime != null){
			this.updateTime = (Date) updateTime.clone();
		}
	}

	public Date getReadTime() {
		if (readTime != null){
			return (Date) readTime.clone();
		}

		return null;
	}

	public void setReadTime(Date readTime) {
		if (readTime != null){
			this.readTime = (Date) readTime.clone();
		}
	}
}